#ifndef _FLASH_H
#define _FLASH_H
#include "sc95f.h"
#define FLASH_LEN     10+1

#define FLASH_STAT    0x5A

#define FLASH_MAX_TIMES  50

#define FLASH_MAX_WRITE_TIMES   3

#define IAP_APROM     0x00
#define IAP_UniqueID  0x01
#define IAP_EEPROM    0x02
#define IAP_LDROM     0x03   

#define FLASH_WRITE_TRY_TIMES         3

#define FLASH_PARAM_SIZE              14
#define FLASH_PARAM_START_ADDR        0
#define FLASH_OPENPOWER_START_ADDR    0x400
#define FLASH_OPENPOWER_SIZE          3

#define PARAM_FIRST_SAVE_HOURS        6   /* 新设备第一次需要连续运行6个小时后才保存参数 */

void ParamTask_Init(void);
void ParamTask(void);
void DefaultCycleOrderParam(void);

#endif